<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateGroundShopInfoBusinTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('ground_shop_info_busin', function (Blueprint $table) {
            $table->increments('id');
            $table->string('city_id',5)->comment('城市id');
            $table->string('shop_id',11)->comment('商户id');
            $table->string('shop_code',255)->comment('商户编号');
            $table->string('shop_ground_type',5)->comment('商家地推类型 1:普通地推 2：合伙人地推');
            $table->integer('register_amount')->default(0)->comment('注册用户数量');
            $table->integer('valid_register_amount')->default(0)->comment('有效注册数量');
            $table->decimal('account_balance',16,2)->default(0.00)->comment('账户余额');
            $table->decimal('ground_register_fee',16,2)->default(0.00)->comment('地推注册收入');
            $table->decimal('ground_other_fee',16,2)->comment('其它收入');
            $table->integer('vaild_order_amount')->comment('有效订单数量');
            $table->decimal('ground_withdrawals_fee',16,2)->default(0.00)->comment('地推已提现金额');
            $table->string('status',5)->comment('状态');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('ground_shop_info_busin');
    }
}
